﻿using HCMS.Entities.OAuth2;
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.EntityFrameworkCore;

namespace HCMS.Repositories.OAuth2
{
    /// <summary>
    /// OAuth 2.0 连接池
    /// </summary>
    [ConnectionStringName("OAuth2")]
    public class OAuth2DbContext :
        AbpDbContext<OAuth2DbContext>
    {
        public OAuth2DbContext(DbContextOptions<OAuth2DbContext> options)
            : base(options)
        {

        }

        #region 注册实体

        /// <summary>
        /// OAuth 2.0 应用
        /// </summary>
        public DbSet<OAuth2App> OAuth2App { get; set; }

        /// <summary>
        /// OAuth2AccessToken
        /// </summary>
        public DbSet<OAuth2AccessToken> OAuth2AccessToken { get; set; }

        /// <summary>
        /// Api 请求日志
        /// </summary>
        public DbSet<ApiRequestLogs> ApiRequestLogs { get; set; }
        #endregion
    }
}
